"use strict";
cc._RF.push(module, 'e6f345dupxH6bTs2fhz53AG', 'showMission');
// Script/showMission.js

"use strict";

cc.Class({
  "extends": cc.Component,
  properties: {
    topNode: {
      "default": null,
      type: cc.Node
    }
  },
  // LIFE-CYCLE CALLBACKS:
  // onLoad () {},
  //显示升级界面--预制体
  showTip: function showTip(event, customEventData) {
    var that = this;
    var CanvasNode = this.topNode;

    if (!CanvasNode) {
      cc.log('find Canvas error');
      return;
    }

    var onResourceLoaded = function onResourceLoaded(errorMessage, loadedResource) {
      if (errorMessage) {
        cc.log('Prefab error:' + errorMessage);
        return;
      }

      if (!(loadedResource instanceof cc.Prefab)) {
        cc.log('Prefab error');
        return;
      }

      var newMyPrefab = cc.instantiate(loadedResource);
      CanvasNode.addChild(newMyPrefab, 100);
      newMyPrefab.setPosition(0, 0);
      var newMyPrefabScript = newMyPrefab.getComponent('Mission');
    };

    cc.resources.load('Mission', onResourceLoaded);
  },
  start: function start() {} // update (dt) {},

});

cc._RF.pop();